package io.wmy.supex.common.bean;

import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by qiaoming on 2016/8/5.
 */
@Repository
public class MyContent {
    private String id;
    private String title;
    private String description;
    private Date pubDate;
    private String link;
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
    public Date getPubDate() {
        return pubDate;
    }
    public void setPubDate(Date pubDate) {
        this.pubDate = pubDate;
    }
    public String getLink() {
        return link;
    }
    public void setLink(String link) {
        this.link = link;
    }
    public List<MyContent> createContent() {
        List<MyContent> feeds = new ArrayList<>();
        MyContent feed1 = new MyContent();
        feed1.setId("100");
        feed1.setTitle("Title one");
        feed1.setDescription("This is description one");
        feed1.setLink("http://www.urlone.com");
        feed1.setPubDate(new Date());
        feeds.add(feed1);

        MyContent feed2 = new MyContent();
        feed2.setId("200");
        feed2.setTitle("Title two");
        feed2.setDescription("This is description two");
        feed2.setLink("http://www.urltwo.com");
        feed2.setPubDate(new Date());
        feeds.add(feed2);
        return feeds;
    }
}